COMBAT_FRAME_MAXCNT = 40

COMBAT_ATK_TIME = 5         -- 每次攻击消耗时间

-- 对战左右双方
ATTACK_SIDE			= 1 	-- 左方
DEFEND_SIDE 		= 2 	-- 右方
--攻守站位
SIDE2POS = {[0] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20},[1] = {1,2,3,4,5,6,7,8,9,10},[2] = {11,12,13,14,15,16,17,18,19,20}}
SIDE2HELPPOS = {[0] = {21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40},[1] = {21,22,23,24,25,26,27,28,29,30},[2] = {31,32,33,34,35,36,37,38,39,40}}
--前，中，后排目标选择策略 begin
ROW2POS = {
    [1] ={
        [1] = {1,2,3},
        [2] = {4,5,6},
        [3] = {7,8,9},
    },
    [2] = {
        [1] = {11,12,13},
        [2] = {14,15,16},
        [3] = {17,18,19},
    }
}

COLUMN2POS = {
    [1] ={
         [1] = {1,4,7},
         [2] = {2,5,8},
         [3] = {3,6,9},
    },
    [2] ={
         [1] = {11,14,17},
         [2] = {12,15,18},
         [3] = {13,16,19},
    },
}
--前，中，后排目标选择策略 end

--默认目标选择策略 begin九 零 一 起玩 www.9 01  7 5. com 
DEFAULT_TARGET_POS = {
    [13] = {3,6,9,2,1,5,4,8,7},
    [16] = {3,6,9,2,1,5,4,8,7},
    [19] = {3,6,9,2,1,5,4,8,7},
    [12] = {2,5,8,1,3,4,6,7,9},
    [15] = {2,5,8,1,3,4,6,7,9},
    [18] = {2,5,8,1,3,4,6,7,9},
    [11] = {1,4,7,2,3,5,6,8,9},
    [14] = {1,4,7,2,3,5,6,8,9},
    [17] = {1,4,7,2,3,5,6,8,9},

    [3] = {13,16,19,12,11,15,14,18,17},
    [6] = {13,16,19,12,11,15,14,18,17},
    [9] = {13,16,19,12,11,15,14,18,17},
    [2] = {12,15,18,11,13,14,16,17,19},
    [5] = {12,15,18,11,13,14,16,17,19},
    [8] = {12,15,18,11,13,14,16,17,19},
    [1] = {11,14,17,12,13,15,16,18,19},
    [4] = {11,14,17,12,13,15,16,18,19},
    [7] = {11,14,17,12,13,15,16,18,19},
}

DEFAULT_TARGET_POS2 = {
    [13] = {3,2,1,6,5,4,9,8,7},
    [16] = {3,2,1,6,5,4,9,8,7},
    [19] = {3,2,1,6,5,4,9,8,7},
    [12] = {2,1,3,5,4,6,8,7,9},
    [15] = {2,1,3,5,4,6,8,7,9},
    [18] = {2,1,3,5,4,6,8,7,9},
    [11] = {1,2,3,4,5,6,7,8,9},
    [14] = {1,2,3,4,5,6,7,8,9},
    [17] = {1,2,3,4,5,6,7,8,9},

    [3] = {13,12,11,16,15,14,19,18,17},
    [6] = {13,12,11,16,15,14,19,18,17},
    [9] = {13,12,11,16,15,14,19,18,17},
    [2] = {12,11,13,15,14,16,18,17,19},
    [5] = {12,11,13,15,14,16,18,17,19},
    [8] = {12,11,13,15,14,16,18,17,19},
    [1] = {11,12,13,14,15,16,17,18,19},
    [4] = {11,12,13,14,15,16,17,18,19},
    [7] = {11,12,13,14,15,16,17,18,19},
}
--默认目标选择策略 end

BACKUP_POS = {10,20}

BACKUP_BUFF_REATE = {[5]=100,[6]=200,[7]=300,[8]=400,[9]=500,[10]=600,[11]=700,[12]=800,[13]=900,}
-- 上阵技能
BACKUP_BUFF_SKILL = {4000, 1, 0, 0}

--默认大小和位移
DEFAULT_POS_OFFSET = 300
DEFAULT_POS_SIZE = {
    {220, 665 + DEFAULT_POS_OFFSET, 9600}, {220, 555 + DEFAULT_POS_OFFSET, 9100}, 
    {140, 790 + DEFAULT_POS_OFFSET, 10000}, {80, 665 + DEFAULT_POS_OFFSET, 9600}, 
    {60, 555 + DEFAULT_POS_OFFSET, 9100}, {110, 450 + DEFAULT_POS_OFFSET, 9000},
    {420, 665 + DEFAULT_POS_OFFSET, 9600}, {420, 555 + DEFAULT_POS_OFFSET, 9100}, 
    {500, 790 + DEFAULT_POS_OFFSET, 10000}, {560, 665 + DEFAULT_POS_OFFSET, 9600}, 
    {580, 555 + DEFAULT_POS_OFFSET, 9100}, {530, 450 + DEFAULT_POS_OFFSET, 9000},
    {210, 370 + DEFAULT_POS_OFFSET, 10000}, {430, 370 + DEFAULT_POS_OFFSET, 10000},
    {500, 790 + DEFAULT_POS_OFFSET, 10000}, {560, 665 + DEFAULT_POS_OFFSET, 9600}, 
    {580, 555 + DEFAULT_POS_OFFSET, 9100}, {530, 450 + DEFAULT_POS_OFFSET, 9000},
    {210, 370 + DEFAULT_POS_OFFSET, 10000}, {430, 370 + DEFAULT_POS_OFFSET, 10000},
}

COMBAT_ROUND_MAX	= 15	-- 最大回合数
COMBAT_HERO_CNT		= 10 	-- 单边出战英雄最大个数
COMBAT_HERO_ALL_CNT = 20	-- 两边出战英雄最大个数
COMBAT_HERO_ARRAY   = 3     -- 最大支持3组英雄
COMBAT_BACKUP_POS   = 10    --援军站位

COMBAT_HELP_CNT     = 10    -- 单边出战辅助对象最大个数
COMBAT_HELP_ALL_CNT = 20    -- 两边出战辅助对象最大个数


-- 战斗结果：0-平局 1-攻方胜利 2-守方胜利
RESULT_TIE = 0
RESULT_WIN = 1
RESULT_FAIL = 2

--技能类型
SKILL_TYPE1 = 1 --普通攻击
SKILL_TYPE2 = 2 --技能攻击
SKILL_TYPE3 = 3 --反击攻击
SKILL_TYPE4 = 4 --魔兽攻击
SKILL_TYPE5 = 5 --技能包攻击(按顺序生效技能包中其中一个)
SKILL_TYPE6 = 6 --技能包攻击(技能包全部生效)
SKILL_TYPE7 = 7 --技能包攻击(随机生效技能包中其中一个)

--buffer时效类型
BUFFER_TYPE1			= 1		-- 即时buffer
BUFFER_TYPE2			= 2		-- 普通buffer
BUFFER_TYPE3			= 3		-- 永久buffer
BUFFER_TYPE4			= 4		-- buffer包

--buffer效果类型
BUFFER_CMD_TYPE1			= 1		-- 增益buffer
BUFFER_CMD_TYPE2			= 2		-- 减益buffer

BUFFER_OP_ADD           = 1     -- 添加
BUFFER_OP_HOLD          = 2     -- 持续
BUFFER_OP_DEL           = 3     -- 删除

--战斗静态属性值
--状态标记
FLAG_BAOJI = 1 --暴击
FLAG_GEDANG = 2 --格挡
FLAG_SHANBI = 3 --闪避

--战斗类型
COMBAT_TYPE1 = 1 --征战/战役
COMBAT_TYPE2 = 2 --皇冠联赛/冠军联赛（进攻）
COMBAT_TYPE3 = 3 --皇冠联赛/冠军联赛（防守）
COMBAT_TYPE4 = 4 --众神之战/王者争霸
COMBAT_TYPE5 = 5 --星空争霸/战神殿
COMBAT_TYPE6 = 6 --通天塔/恶魔之塔
COMBAT_TYPE7 = 7 --日常副本/黄金圣树
COMBAT_TYPE8 = 8 --无尽之路/绝望深渊
COMBAT_TYPE9 = 9 --圣树试炼/勇者试炼
COMBAT_TYPE10 = 10 --遗迹探宝/遗迹探险
COMBAT_TYPE11 = 11 --公会BOSS
COMBAT_TYPE12 = 12 --公会战（进攻）
COMBAT_TYPE13 = 13 --公会战（防守）
COMBAT_TYPE14 = 14 --好友切磋
COMBAT_TYPE15 = 15 --天梯（进攻）
COMBAT_TYPE16 = 16 --天梯（防守）
COMBAT_TYPE17 = 17 --荣耀峡谷/龙族战场
COMBAT_TYPE18 = 18 --剧情动画(cs专用)
COMBAT_TYPE19 = 19 --心愿试炼(gz专用)
COMBAT_TYPE20 = 20 --冰龙巢穴
COMBAT_TYPE21 = 21 --英雄展示
COMBAT_TYPE22 = 22 --英雄展示
COMABT_TYPE23 = 23 --次元魔蛛
COMBAT_TYPE24 = 24 --失落神庙
COMBAT_TYPE_MAX = 24 --阵容最大数
--对象类型
COMBAT_OBJ_TYPE1 = 1 --玩家 
COMBAT_OBJ_TYPE2 = 2 --怪物
COMBAT_OBJ_TYPE3 = 3 --BOSS

--职业枚举
JOB_TYPE1 = 1 --虎卫
JOB_TYPE2 = 2 --猛将
JOB_TYPE3 = 3 --谋士
JOB_TYPE4 = 4 --方士
JOB_TYPE5 = 5 --傀儡

VEDIO_TYPE_NOMAL = 0
VEDIO_TYPE_JJC = 1

--魔兽
PET_CD  = 3

--伤害类型
PHY_HURT_TYPE = 0
MAGIC_HURT_TYPE = 1

--是否援军
BACKUP_TYPE0 = 0--非援军
BACKUP_TYPE1 = 1--未上阵的援军
BACKUP_TYPE2 = 2--已经上阵的援军

FIGHT_MODE0 = 0  --正常模式
FIGHT_MODE1 = 1  --伤害递增模式 
FIGHT_MODE2 = 2  --剧情模式
FIGHT_MODE3 = 3  --世界boss模式

function isBackup(obj)
    if obj.pos == BACKUP_POS[1] or obj.pos == BACKUP_POS[2]  then
        if obj.backupPos then
            return BACKUP_TYPE2
        else
            return BACKUP_TYPE1
        end
    end
    return BACKUP_TYPE0
end
--辅助对象站位
HELP_TYPE0 = 0  --武将
HELP_TYPE1 = 1  --魔兽
function getHelpPos(side,type)
    return SIDE2HELPPOS[side][type]
end

CAMP_ALL = 6

PET_ATKPOS = 21
PET_DEFPOS = 31

--阵营枚举
CAMP_TYPE1 = 1 --恶魔
CAMP_TYPE2 = 2 --圣堂
CAMP_TYPE3 = 3 --不死
CAMP_TYPE4 = 4 --神域
CAMP_TYPE5 = 5 --混沌




